﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using ServicioWebRest.Areas.Api.Models;

namespace ServicioWebRest.Areas.Api.Controllers
{
    public class InfoUsuariosController : Controller
    {
        private UsuarioManager usuarioManager;

        public InfoUsuariosController()
        {
            usuarioManager = new UsuarioManager();
        }
        [HttpGet]
        public JsonResult InfoUsuarios(string usu)
        {
            switch (Request.HttpMethod)
            {
                case "GET":
                    return Json(usuarioManager.ObtenerInfoUsuario(usu), JsonRequestBehavior.AllowGet);
            }
            return Json(new { Error = true, Message = "Operación HTTP desconocida" });
        }

    }
}
